Ext.define('yxt.view.RegisterWin', {
	extend: 'Ext.window.Window',
	alias: 'widget.registerWin',
	layout: 'fit',
	title:'注册',
	closable: false,
	width: 554,
	height:234,
	initComponent: function() {
		var me = this;
		var sexStore = Ext.create('Ext.data.Store',{
			fields: [{name: 'name'},{name: 'value'}],	
			data: [{name: '男', value: 'M'},{name: '女', value: 'F'}]
		});
		me.items = [{
			xtype:'form',
			defaults:{
				cls:'yxt_float_left',
				xtype:'textfield',
				labelAlign: 'right',
				margin:'5 5 5 5'
			},
			items: [
			          {			  
			        	  fieldLabel: '用户名',
			        	  name: 'user_id',
			        	  allowBlank:false
			          },
			          {
			        	  fieldLabel: '密码',
			        	  inputType: 'password',
			        	  allowBlank:false,
			        	  name: 'password'
			        	  
			          },
			          {
			        	  
			        	  fieldLabel: '确认密码',
			        	  inputType: 'password',
			        	  allowBlank:false,
			        	  name: 'password1'
			        	  
			          },
			          {
			        	  fieldLabel: '真实姓名',
			        	  allowBlank:false,
			        	  name: 'name'
			          },
			          {
			        	  xtype: 'combobox',
			        	  fieldLabel: '性别',
			        	  store: sexStore,
			        	  name: 'sex',
			        	  queryMode: 'local',
			        	  displayField: 'name',
			        	  valueField: 'value',
			        	  value: 'M'
			          },
			          {
			        	  xtype: 'datefield',
			        	  fieldLabel: '出生日期',
			        	  name: 'birth',
			        	  format: 'Y-m-d',
			        	  allowBlank:false,
			        	  maxValue: new Date()
			          },
			          {			  
			        	  fieldLabel: '手机',
			        	  name: 'phone',
			        	  emptyText: '方便联系到你'
			          },
			          {
			        	  fieldLabel: 'Email',
			        	  name: 'email',
			        	  emptyText: '方便联系到你'
			          },
			          {
							xtype: 'textfield',
							fieldLabel: '地址',
							labelAlign: 'right',
							name: 'address',
							anchor: '98%',
							emptyText: '方便寄送礼品'
			  }]
		}];
		me.buttons =  [{
			xtype: 'button',
			text: '提交注册',
			itemId: 'registerBtn'					
		  },{
				xtype: 'button',
				text: '返回登陆',
				itemId: 'backLoginBtn'	,
				handler: function() {
					me.close();
					Ext.widget('loginWin').show();							
				}
		}];
		me.callParent(arguments);
	}
});